﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Welcome.aspx.cs" Inherits="ZX.WebApp.Crm.Welcome" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/reset-fonts-grids/reset-fonts-grids.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/menu/assets/skins/sam/menu.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <link href="../Styles/css.index.css" rel="stylesheet" type="text/css" />
    <link href="../Scripts/EasyUI/themes/default/easyui.css" rel="Stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            font-size: 12px;
        }
        table
        {
            border: 0;
            border-collapse: collapse;
        }
        td
        {
            font: normal 12px/17px Arial;
            padding: 2px;
            width: 100px;
        }
        th
        {
            font: bold 12px/17px Arial;
            text-align: left;
            padding: 4px;
            border-bottom: 1px solid #333;
        }
        .even
        {
            background: #FFF38F;
        }
        /* 偶数行样式*/
        .odd
        {
            background: #e0ecf8;
        }
        /* 奇数行样式*/
        .selected
        {
            background: #FFFFEA;
            color: blue;
            cursor: pointer;
        }
        /*通用超级链接各种样式*/
        a:visited
        {
            text-decoration: none;
            color: 143B5A;
        }
        a:active
        {
            text-decoration: none;
            color: 143B5A;
        }
        a:hover
        {
            text-decoration: none;
            color: #FE611B;
        }
        a:link
        {
            text-decoration: none;
            color: 143B5A;
        }
    </style>
    <!-- OPTIONAL: Connection Manager (enables XHR for DataSource) -->
    <!-- OPTIONAL: Connection Manager (enables XHR for DataSource) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo/yahoo.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/event/event-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <!-- OPTIONAL: JSON Utility (for DataSource) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <!-- OPTIONAL: Connection Manager (enables XHR for DataSource) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <!-- OPTIONAL: Get Utility (enables dynamic script nodes for DataSource) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <!-- OPTIONAL: Drag Drop (enables resizeable or reorderable columns) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <!-- OPTIONAL: Calendar (enables calendar editors) -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/calendar/calendar-min.js"></script>
    <!-- Source files -->
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/resize/resize-min.js"></script>
    <script src="../Scripts/EasyUI/js/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Scripts/EasyUI/js/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Scripts/EasyUI/js/jquery-outlook.js" type="text/javascript"></script>
    <script type="text/javascript">
        var Tag = true;
        var mpoolIDValue; //信息池ID


        //我的消息
        var handleSuccess2 = function (o) {
            if (o.responseText != "0") {
                document.getElementById("Lb_MessageList").innerHTML = o.responseText;
            }
        }

        var handleFailure2 = function (o) {
            alert('出错了handleFailure2');
        }


        var callback2 =
        {
            success: handleSuccess2,
            failure: handleFailure2,
            argument: { foo: "foo", bar: "bar" }
        };

        var handleSuccess1 = function (o) {
            if (o.responseText != "0") {
                showMessage("消息提醒", "<a href='#' onclick=\"javascript:ShowMsg('" + o.responseText + "',3)\" >你有新的未读消息,请点击此链接查看<a>", 2000);
            }
        }

        var handleFailure1 = function (o) {
          
        }


        var callback1 =
        {
            success: handleSuccess1,
            failure: handleFailure1,
            argument: { foo: "foo", bar: "bar" }
        };
        var getUnreadMessage = function () {
            var url = "../Extend/AjaxData/DataProcessin.aspx?action=Get&r=" + Math.random() + "&entity=V_HistoryMessagePool&state=3";
            YAHOO.util.Connect.asyncRequest('Post', url, callback1);

        }
        var getStateMessage = function (state) {
            var radions = document.getElementsByName("expectedVia");
            var state = "";
            for (var i = 0; i < radions.length; i++) {
                radions[i].onclick = getStateMessage;
                if (radions[i].checked) {
                    state = radions[i].value;

                }
            }
            var url = "../Extend/AjaxData/DataProcessin.aspx?action=Get" + "&r=" + Math.random() + "&entity=V_HistoryMessagePool&state=" + state;
            var request = YAHOO.util.Connect.asyncRequest('Post', url, callback2);

        }
        //Tab标签
        function setTab(name, cursel, n) {
            for (i = 1; i <= n; i++) {
                var menu = document.getElementById(name + i);
                var con = document.getElementById("con_" + name + "_" + i);
                menu.className = i == cursel ? "hover" : "";
                con.style.display = i == cursel ? "block" : "none";
            }
        }
        setInterval(getUnreadMessage, 120000);
        var load = function () {
            //setTab('two',1,5);
            getStateMessage();
            GetAnnounce();
            //弹出对话框
            YAHOO.namespace("example.container");
            var handleSubmit = function () {
                var editwindow = document.getElementById("EditUIWindow");
                if (editwindow) {
                    editwindow.contentWindow.Save();
                }
            };
            var handleCancel = function () {
                this.cancel();
            };
            var handleSuccess = function (o) {
                var response = o.responseText;
                response = response.split("<!")[0];
                document.getElementById("resp").innerHTML = response;
            };
            var handleFailure = function (o) {
                alert('出错了handleFailure');
            };
            var const_EditWindowWidth = "720px",
		const_EditWindowHeight = "410px";
            // Remove progressively enhanced content class, just before creating the module
            YAHOO.util.Dom.removeClass("dialog1", "yui-pe-content");

            // Instantiate the Dialog
            YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1",
							    { width: const_EditWindowWidth,
							        height: const_EditWindowHeight,
							        fixedcenter: true,
							        visible: false,
							        draggable: true,
							        close: true,
							        autofillheight: "body",
							        constraintoviewport: true,
							        buttons: [
								          { text: "取消", handler: handleCancel}]
							    });
            // Wire up the success and failure handlers
            YAHOO.example.container.dialog1.callback = { success: handleSuccess,
                failure: handleFailure
            };
            // Render the Dialog
            YAHOO.example.container.dialog1.render();



        }
        var handleSuccess3 = function (o) {
            document.getElementById("LblAnnounce").innerHTML = o.responseText;

        };
        var handleFailure3 = function () {
            alert('出错了handleFailure3');
        };
        var callBack3 =
        {
            success: handleSuccess3,
            failure: handleFailure3,
            argument: { foo: "foo", bar: "bar" }
        };
        var GetAnnounce = function () {
            var url = "../Extend/AjaxData/DataProcessin.aspx?action=Get" + "&r=" + Math.random() + "&entity=Announce";
            var request = YAHOO.util.Connect.asyncRequest('Post', url, callBack3);
        }

        var ShowMsg = function (msgId, state) {
            document.getElementById("EditUIWindow").src = "ShowMessage.aspx?ID=" + msgId + "&state=" + state;
            YAHOO.example.container.dialog1.show();
        };
        var ChangeClass = function (obj, className) {
            obj.className = "";
            obj.className = className;
        }
        var ShowAnnounce = function (announceId) {
            document.getElementById("EditUIWindow").src = "../EditWidows/SysManager/ShowAnnounce.aspx?ID=" + announceId + "&r=" + Math.random() + "";
            YAHOO.example.container.dialog1.show();
        }
        var unDone = function () {
            parent.addTabs("待办任务", "../Extend/YUIList.aspx?entity=V_HF_TaskInstanceView&functionID=17eae1ad-6f95-44bb-a231-3bfb8276ae81");
        }
    </script>
</head>
<body onload="load();" class="yui-skin-sam">
    <form id="form1" runat="server">
    <div style="padding-left: 10px; float: left; width: 69%">
        <div id="hd">
            <table bordercolor="#e0ecf8" height="280" cellspacing="0" cellpadding="0" width="100%"
                align="left" border="1">
                <tr>
                    <td bgcolor="#f2f7fb" style="height: 23px">
                        <font size="3"><b>我的消息</b></font>
                    </td>
                </tr>
                <tr style="height: 18px;">
                    <td style="width: 100%">
                        <input type="radio" name="expectedVia" value="0" checked="checked">未查看
                        <input type="radio" name="expectedVia" value="1">已查看
                        <input type="radio" name="expectedVia" value="">全部
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 10px; width: 100%" valign="top">
                        <asp:Label ID="Lb_MessageList" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" height="10" style="width: 100%">
                        <a href="#">
                            <img height="5" src="images/more02.jpg" width="31" border="0" style="float: right"></a>&nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </div>
        <div id="NeedTranact">
            <%-- <div id="Tab2">
                <div class="Menubox">
                    <ul>
                        <li id="two1" onclick="setTab('two',1,5)">未认领任务</li>
                        <li id="two2" onclick="setTab('two',2,5)">已认领任务</li>
                        <li id="two3" onclick="setTab('two',3,5)">已完成的任务</li>
                        <li id="two4" onclick="setTab('two',4,5)">我参与的任务</li>
                        <li id="two5" onclick="setTab('two',5,5)">异常终止的任务</li>
                    </ul>
                </div>
                <div class="Contentbox">
                    <div id="con_two_1">
                        <div id="con_1">
                        </div>
                    </div>
                    <div id="con_two_2" style="display: none">
                        <div id="con_2">
                        </div>
                    </div>
                    <div id="con_two_3" style="display: none">
                        <div id="con_3">
                        </div>
                    </div>
                    <div id="con_two_4" style="display: none">
                        <div id="con_4">
                        </div>
                    </div>
                    <div id="con_two_5" style="display: none">
                        <div id="con_5">
                        </div>
                    </div>
                </div>
            </div> --%>
            <table bordercolor="#e0ecf8" height="280" cellspacing="0" cellpadding="0" width="100%"
                align="left" border="1">
                <tr>
                    <td bgcolor="#f2f7fb" style="height: 23px">
                        <font size="3"><b>待办事宜</b></font>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 10px; width: 100%" valign="top">
                        <asp:Label ID="Label1" runat="server">
                    &nbsp;&nbsp;<img align= 'absMiddle' src='Images/BoardList.gif' width='10' height='10'>
                    <a href='javascript:unDone()'>您有<font color="red">[<%=unDoneNum%>]</font>件待办的任务</a>
                    <br /></n>
           
                   <%--  &nbsp;&nbsp;<img align="middle" src='Images/BoardList.gif' width='10' height='10'>
                    <a href='#'>你有<font color=red>[1]</font>条需要处理的请假单</a>
                    <br /></n>--%>
                        </asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" height="10" style="width: 100%">
                        <a href="#">
                            <img height="5" src="images/more02.jpg" width="31" border="0" style="float: right"></a>&nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div style="float: right; width: 29%; padding-right: 0px">
        <div id="AnnounceList">
            <table bordercolor="#e0ecf8" height="280" cellspacing="0" cellpadding="0" width="100%"
                align="left" border="1">
                <tr>
                    <td bgcolor="#f2f7fb" style="height: 23px">
                        <font size="3"><b>系统公告</b></font>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 10px; width: 100%" valign="top">
                        <marquee direction="up" behavior="scoll" scrollamount="2" scrolldelay="50" align="top"
                            width="100%" hspace="0" vspace="0" onmouseover="this.stop()" onmouseout="this.start()">
                                    <asp:Label ID="LblAnnounce" runat="server">

                                    </asp:Label>
                          </marquee>
                    </td>
                </tr>
                <tr>
                    <td align="right" height="10" style="width: 100%">
                        <a href="#">
                            <img height="5" src="images/more02.jpg" width="31" border="0" style="float: right"></a>&nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </div>
        <div id="DivTools">
            <table bordercolor="#e0ecf8" height="280" cellspacing="0" cellpadding="0" width="100%"
                border="1">
                <tr>
                    <td bgcolor="#f2f7fb" style="height: 23px">
                        <font size="3"><b>常用工具</b></font>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 10px; width: 100%" valign="top">
                        <table width="100%">
                            <tr>
                                <td style="width: 15%">
                                    <a href="../Assistant/AddressList.aspx">
                                        <asp:Image ID="Image3" runat="server" Height="35px" ImageUrl="images/ToolImage/通讯录.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="../Assistant/AddressList.aspx">通讯录</a>
                                </td>
                                <td style="width: 15%">
                                    <a href="http://qx121.com/web/index.asp" target="_blank">
                                        <asp:Image ID="Image4" runat="server" Height="35px" ImageUrl="images/ToolImage/天气预报.bmp" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://qx121.com/web/index.asp" target="_blank">天气预报</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 15%; height: 20px;">
                                    <a href="http://www.nbjj.gov.cn" target="_blank">
                                        <asp:Image ID="Image5" runat="server" Height="35px" ImageUrl="images/ToolImage/交通违章图标.jpg" /></a>
                                </td>
                                <td style="height: 20px; width: 35%;">
                                    <a href="http://www.nbjj.gov.cn" target="_blank">交通违章</a>
                                </td>
                                <td style="height: 20px; width: 15%;">
                                    <a href="http://news.cixi.cn/newsinfo.asp?id=6602" target="_blank">
                                        <asp:Image ID="Image6" runat="server" Height="35px" ImageUrl="images/ToolImage/常用电话.jpg" /></a>
                                </td>
                                <td style="width: 35%; height: 35px;">
                                    <a href="http://news.cixi.cn/newsinfo.asp?id=6602" target="_blank">常用电话</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 15%">
                                    <a href="http://www.shike.org.cn/" target="_blank">
                                        <asp:Image ID="Image7" runat="server" Height="35px" ImageUrl="images/ToolImage/火车时刻.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://www.shike.org.cn/" target="_blank">火车时刻</a>
                                </td>
                                <td style="width: 15%">
                                    <a href="http://www.ningbo-airport.com/web/Hangban_plan.aspx" target="_blank">
                                        <asp:Image ID="Image8" runat="server" Height="35px" ImageUrl="images/ToolImage/航班信息1.jpg"
                                            Width="22px" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://www.ningbo-airport.com/web/Hangban_plan.aspx" target="_blank">航班信息</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 20px; width: 15%;">
                                    <a href="#">
                                        <asp:Image ID="Image2" runat="server" ImageUrl="images/ToolImage/短信中心.jpg" Width="25px"
                                            Height="21px" /></a>
                                </td>
                                <td style="width: 35%; height: 35px;">
                                    <a href="../SMS/Receive_SMSList.aspx?Type=Receive">短信中心</a>
                                </td>
                                <td style="width: 15%">
                                    <a href="http://www.go2map.com/" target="_blank">
                                        <asp:Image ID="Image10" runat="server" Height="35px" ImageUrl="images/ToolImage/地图图标.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://www.go2map.com/" target="_blank">在线地图</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 15%; height: 20px;">
                                    <a href="http://www.ip138.com" target="_blank">
                                        <asp:Image ID="Image11" runat="server" Height="35px" ImageUrl="images/ToolImage/bus.png" /></a>
                                </td>
                                <td style="height: 20px; width: 35%;">
                                    <a href="http://map.baidu.com/" target="_blank">公交查询</a>
                                </td>
                                <td style="height: 20px; width: 15%;">
                                    <a href="http://www.hao123.com/haoserver/wn.htm" target="_blank">
                                        <asp:Image ID="Image12" runat="server" Height="35px" ImageUrl="images/ToolImage/calendar_48.png" /></a>
                                </td>
                                <td style="width: 35%; height: 20px;">
                                    <a href="http://www.hao123.com/haoserver/wn.htm" target="_blank">万年历</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 15%">
                                    <a href="http://www.onlinetranslation.cn" target="_blank">
                                        <asp:Image ID="Image13" runat="server" Height="35px" ImageUrl="images/ToolImage/在线翻译.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://www.onlinetranslation.cn" target="_blank">在线翻译</a>
                                </td>
                                <td style="width: 15%">
                                    <a href="http://push.cb.kingsoft.com/index.htm" target="_blank">
                                        <asp:Image ID="Image14" runat="server" Height="35px" ImageUrl="images/ToolImage/在线词典.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://push.cb.kingsoft.com/index.htm" target="_blank">在线词典</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 15%">
                                    <a href="http://cixiedu.vip.qikan.com/" target="_blank">
                                        <asp:Image ID="Image15" runat="server" Height="35px" ImageUrl="images/ToolImage/calculator.png" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://cixiedu.vip.qikan.com/" target="_blank">计算器</a>
                                </td>
                                <td style="width: 15%">
                                    <a href="http://www.5566.net/ " target="_blank">
                                        <asp:Image ID="Image16" runat="server" Height="35px" ImageUrl="images/ToolImage/网址导航.jpg" /></a>
                                </td>
                                <td style="width: 35%">
                                    <a href="http://www.5566.net/ " target="_blank">网址导航</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="dialog1" class="yui-pe-content">
        <div class="bd">
            <iframe id="EditUIWindow" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    </form>
</body>
</html>
